package com.lagou.homework.stage2.no3;

/**
 * 上网套餐类，优化后继承抽象套餐类 Package
 */
public class NetPackage extends Package implements NetService {
    private String netFlow; // 上网流量
//    private double rates; // 每月资费

    public NetPackage() {
    }

    public NetPackage(double rates, String netFlow) {
        super(rates);
        this.netFlow = netFlow;
    }

    public String getNetFlow() {
        return netFlow;
    }
    public void setNetFlow(String netFlow) {
        this.netFlow = netFlow;
    }
//    public double getRates() {
//        return rates;
//    }
//    public void setRates(double rates) {
//        this.rates = rates;
//    }

    /**
     * 显示左右套餐信息
     */
    public void show(){
        System.out.println("上网流量："+getNetFlow()+", 每月资费："+getRates());
    }

    @Override
    public void test2(String netFlow, MobileCard mobileCard) {

        System.out.println("test2---netFlow: "+ netFlow);
        mobileCard.show();
    }
}
